<?php
/**
 * Name: 服务工厂.
 * User: Small_K
 * Date: 2018/1/11
 * Time: 16:32
 */

namespace App\Services\Service;

class ServiceFactory
{
    const REPO_SERVICE = '\\App\\Services\\Callback\\';

    /**
     *
     * 创建服务
     *
     * @param $resource
     * @return mixed
     */
    public function createService($resource)
    {
        $serviceName = self::REPO_SERVICE . ucfirst($resource.'Callback');
        return new $serviceName;
    }
}